package com.ruoyi.carShop.controller;


import com.ruoyi.carShop.service.CouponsZhService;
import com.ruoyi.system.api.domain.Coupons;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * @Author：张因丛
 * @Date ：2024/9/13 20:44
 */
@RestController
@CrossOrigin
@RequestMapping("/couponszh")
public class CouponsZhController {
    @Autowired
    private CouponsZhService couponsZhService;

    @RequestMapping("/carryout")
    public List<Coupons> selectForCouponsZh() {
        return couponsZhService.selectForCouponsZh();
    }
    @RequestMapping("/carryout2")
    public List<Coupons> selectEndCouponsZh() {
        return couponsZhService.selectEndCouponsZh();
    }
    @RequestMapping("/couponsinsert")
    public Integer insertCouponsZh(@RequestBody Coupons Coupons) {
        return couponsZhService.insertCouponsZh(Coupons);
    }
}
